package cn.getech.data.metadata.controller;

import cn.getech.data.intelligence.common.utils.R;
import cn.getech.data.metadata.model.req.collectiontableinfo.CollectiionTableInfoListReq;
import cn.getech.data.metadata.model.res.collectionTableAnalysis.CollectionTableAnalysisRes;
import cn.getech.data.metadata.service.ICollectionTableAnalysisService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value="元数据分析",tags={"元数据分析"})
@RestController
@RequestMapping("md/collectionTableAnalysis")
public class CollectionTableAnalysisController {


    @Autowired
    private ICollectionTableAnalysisService collectionTableAnalysisService;


    @ApiOperation("冷热度分析列表")
    @PostMapping("/coldAndHotList")  ///  /data-metadata/md/collectionTableAnalysis/coldAndHotList/
    public R   coldAndHotList(@RequestBody  CollectiionTableInfoListReq param) {
        List<CollectionTableAnalysisRes> data = collectionTableAnalysisService.coldAndHotList(param.getId(),
                param.getPage(),param.getLimit());
        return R.okWithData(data);
    }



}
